package com.atguigu.ext;

import org.springframework.context.ApplicationEvent;
import org.springframework.context.event.EventListener;
import org.springframework.stereotype.Service;

/**
 * Program Name: spring-annotation
 * Created by yanlp on 2022-04-01
 *
 * @author yanlp
 * @version 1.0
 */
@Service
public class UserService {

    @EventListener(ApplicationEvent.class)
    public void listen(ApplicationEvent event) {
        System.out.println("UserService...收到的事件:" + event);
    }


}
